package com.kevin.designpattern.command;

public class Client {
    public static void main(String[] args) {

        // 创建第一个订单对象
        Order order1 = new Order();
        order1.setDiningTable(1);
        order1.setFood("西红柿鸡蛋面", 1);
        order1.setFood("大瓶雪碧", 1);

        // 创建第二个订单对象
        Order order2 = new Order();
        order2.setDiningTable(2);
        order2.setFood("牛肉泡馍", 1);
        order2.setFood("小杯可乐", 2);


        // 创建厨师对象
        SeniorChef receiver = new SeniorChef();
        OrderCommand cmd1 = new OrderCommand(receiver, order1);
        OrderCommand cmd2 = new OrderCommand(receiver, order2);

        // 创建调用者对象
        Waitor waitor = new Waitor();
        waitor.setCommand(cmd1);
        waitor.setCommand(cmd2);

        waitor.orderUp();


    }
}
